import java.util.Collections;
import java.util.Vector;

public class ShareQueue {
    public Vector<Task> readyQ = new Vector<>(10, 2);//就绪队列
    public Vector<Task> runQ = new Vector<>(1, 2);//运行队列
    public Vector<Task> doneQ = new Vector<>(10, 2);//完成队列
    public boolean newAddProcessFlag;
    private void Init(){
        Task T1 = new Task("QQ", 10);
        Task T2 = new Task("TX", 15);
        Task T3 = new Task("TB", 20);
        Task T4 = new Task("DD", 25);
        Task T5 = new Task("AL", 30);
        newAddProcessFlag = false;
        readyQ.add(T1);
        readyQ.add(T2);
        readyQ.add(T3);
        readyQ.add(T4);
        readyQ.add(T5);
        Collections.sort(readyQ);
    }
    public ShareQueue() {
        Init();
    }
    public void addTask(Task t){
        readyQ.add(t);
        newAddProcessFlag = true;
    }

}
